<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:wpfModel="clr-namespace:Csizmazia.WpfDynamicUI.WpfDynamicControl"
                    xmlns:reflectiveWpfTools="clr-namespace:Csizmazia.WpfDynamicUI.WpfDynamicControl.ReflectiveWpfTools"
                    xmlns:chartingToolkit="clr-namespace:System.Windows.Controls.DataVisualization.Charting;assembly=System.Windows.Controls.DataVisualization.Toolkit"
                  xmlns:windowsPresentation="clr-namespace:GMap.NET.WindowsPresentation;assembly=GMap.NET.WindowsPresentation"
                    xmlns:customControls="clr-namespace:Csizmazia.WpfDynamicUI.WpfDynamicControl.CustomControls"
                    xmlns:properties="clr-namespace:Csizmazia.WpfDynamicUI.WpfDynamicControl.Properties"
                xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit">
    <reflectiveWpfTools:NotNullToBooleanConverter x:Key="NotNullToBooleanConverter" />
    <reflectiveWpfTools:NotNullToVisibilityConverter x:Key="NotNullToVisibilityConverter" />
    <reflectiveWpfTools:EmptyStringToInvisibleConverter x:Key="EmptyStringToInvisibleConverter" />
    <reflectiveWpfTools:BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter" />
    <reflectiveWpfTools:IsNotEmptyStringConverter x:Key="IsNotEmptyStringConverter" />

    <LinearGradientBrush x:Key="BackgroundBrush" StartPoint="0,0.5" EndPoint="1.0,0.5">
        <GradientStop Color="DarkSlateBlue" Offset="0.0" />
        <GradientStop Color="DarkSlateGray" Offset="1.0" />
    </LinearGradientBrush>


    <Style TargetType="TextBox">
        <Style.Triggers>
            <Trigger Property="Validation.HasError" Value="true">
                <Setter Property="Background" Value="Pink" />
                <!--<Setter Property="Foreground" Value="Black"/>-->
                <Setter Property="ToolTip"
                Value="{Binding RelativeSource={x:Static RelativeSource.Self},
                            Path=(Validation.Errors)[0].ErrorContent}" />

            </Trigger>
            <Trigger Property="IsReadOnly" Value="True">
                <Setter Property="Background" Value="LightGray" />
            </Trigger>
        </Style.Triggers>
        <Setter Property="Validation.ErrorTemplate">
            <Setter.Value>
                <ControlTemplate>
                    <DockPanel LastChildFill="True"
                     ToolTip="{Binding ElementName=controlWithError,Path=AdornedElement.(Validation.Errors)[0].ErrorContent}">
                        <TextBlock DockPanel.Dock="Right" Foreground="Red" FontSize="14pt" Margin="-15,0,0,0"
                       FontWeight="Bold">*</TextBlock>
                        <Border BorderBrush="Red" BorderThickness="1">
                            <AdornedElementPlaceholder Name="controlWithError" />
                        </Border>
                    </DockPanel>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="Foreground" Value="{StaticResource BackgroundBrush}" />
    </Style>
    <Style TargetType="{x:Type xctk:WatermarkTextBox}">
        <Style.Triggers>
            <Trigger Property="Validation.HasError" Value="true">
                <Setter Property="Background" Value="Pink" />
                <!--<Setter Property="Foreground" Value="Black"/>-->
                <Setter Property="ToolTip"
                Value="{Binding RelativeSource={x:Static RelativeSource.Self},
                            Path=(Validation.Errors)[0].ErrorContent}" />

            </Trigger>
            <Trigger Property="IsReadOnly" Value="True">
                <Setter Property="Background" Value="LightGray" />
            </Trigger>
        </Style.Triggers>
        <Setter Property="Validation.ErrorTemplate">
            <Setter.Value>
                <ControlTemplate>
                    <DockPanel LastChildFill="True"
                     ToolTip="{Binding ElementName=controlWithError,Path=AdornedElement.(Validation.Errors)[0].ErrorContent}">
                        <TextBlock DockPanel.Dock="Right" Foreground="Red" FontSize="14pt" Margin="-15,0,0,0"
                       FontWeight="Bold">*</TextBlock>
                        <Border BorderBrush="Red" BorderThickness="1">
                            <AdornedElementPlaceholder Name="controlWithError" />
                        </Border>
                    </DockPanel>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="Foreground" Value="{StaticResource BackgroundBrush}" />
    </Style>
    <Style TargetType="Label">
        <Setter Property="Foreground" Value="{StaticResource BackgroundBrush}" />
    </Style>
    <Style TargetType="TextBlock" x:Key="foregroundTextBlockStyle">
        <Setter Property="Foreground" Value="{StaticResource BackgroundBrush}" />
    </Style>
    <Style TargetType="TextBlock" x:Key="menuGroupHeaderTextBlockStyle">
        <Setter Property="VerticalAlignment" Value="Center" />
        <Setter Property="Margin" Value="3,0,0,0" />
        <Setter Property="Foreground" Value="{StaticResource BackgroundBrush}" />
    </Style>
    <Style TargetType="TextBlock" x:Key="textBlockStyle">
        <Setter Property="Foreground" Value="{StaticResource BackgroundBrush}" />
    </Style>
    <Style TargetType="StatusBar">
        <Setter Property="Foreground" Value="{StaticResource BackgroundBrush}" />
    </Style>
    <Style x:Key="PopupInfoImageStyle" TargetType="Image">
        <Setter Property="Source" Value="/Csizmazia.WpfDynamicControl;component/Resources/ButtonTalkBaloon.png" />
    </Style>
    <Style x:Key="PopupErrorImageStyle" TargetType="Image">
        <Setter Property="Source" Value="/Csizmazia.WpfDynamicControl;component/Resources/ButtonWarning.png" />
    </Style>
    <Style TargetType="chartingToolkit:Chart">
        <Setter Property="MinHeight" Value="300" />
    </Style>
    <!-- Button Styles -->
    <Style x:Key="ButtonStyle" TargetType="Button">
        <Setter Property="ContentTemplate">
            <Setter.Value>
                <DataTemplate>
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="Auto" />
                            <ColumnDefinition />
                        </Grid.ColumnDefinitions>
                        <Image Grid.Column="0" Source="/Csizmazia.WpfDynamicUI.WpfDynamicControl;component/Resources/Button.png"
                   Width="20" />
                        <Label Grid.Column="1"
                   Content="{Binding Path=Content, RelativeSource={RelativeSource FindAncestor, AncestorType=Button, AncestorLevel=1}}" />
                    </Grid>
                </DataTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="ButtonAddStyle" TargetType="Button">
        <Setter Property="ContentTemplate">
            <Setter.Value>
                <DataTemplate>
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="Auto" />
                            <ColumnDefinition />
                        </Grid.ColumnDefinitions>
                        <Image Grid.Column="0" Source="/Csizmazia.WpfDynamicUI.WpfDynamicControl;component/Resources/ButtonAdd.png"
                   Width="20" />
                        <Label Grid.Column="1"
                   Content="{Binding Path=Content, RelativeSource={RelativeSource FindAncestor, AncestorType=Button, AncestorLevel=1}}" />
                    </Grid>
                </DataTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="ButtonAttachRiportStyle" TargetType="Button">
        <Setter Property="ContentTemplate">
            <Setter.Value>
                <DataTemplate>
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="Auto" />
                            <ColumnDefinition />
                        </Grid.ColumnDefinitions>
                        <Image Grid.Column="0"
                   Source="/Csizmazia.WpfDynamicUI.WpfDynamicControl;component/Resources/ButtonAttachRiport.png" Width="20" />
                        <Label Grid.Column="1"
                   Content="{Binding Path=Content, RelativeSource={RelativeSource FindAncestor, AncestorType=Button, AncestorLevel=1}}" />
                    </Grid>
                </DataTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="ButtonCancelStyle" TargetType="Button">
        <Setter Property="ContentTemplate">
            <Setter.Value>
                <DataTemplate>
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="Auto" />
                            <ColumnDefinition />
                        </Grid.ColumnDefinitions>
                        <Image Grid.Column="0"
                   Source="/Csizmazia.WpfDynamicUI.WpfDynamicControl;component/Resources/ButtonCancel.png" Width="20" />
                        <Label Grid.Column="1"
                   Content="{Binding Path=Content, RelativeSource={RelativeSource FindAncestor, AncestorType=Button, AncestorLevel=1}}" />
                    </Grid>
                </DataTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="ButtonChartStyle" TargetType="Button">
        <Setter Property="ContentTemplate">
            <Setter.Value>
                <DataTemplate>
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="Auto" />
                            <ColumnDefinition />
                        </Grid.ColumnDefinitions>
                        <Image Grid.Column="0"
                   Source="/Csizmazia.WpfDynamicUI.WpfDynamicControl;component/Resources/ButtonChart.png" Width="20" />
                        <Label Grid.Column="1"
                   Content="{Binding Path=Content, RelativeSource={RelativeSource FindAncestor, AncestorType=Button, AncestorLevel=1}}" />
                    </Grid>
                </DataTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="ButtonCloseStyle" TargetType="Button">
        <Setter Property="ContentTemplate">
            <Setter.Value>
                <DataTemplate>
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="Auto" />
                            <ColumnDefinition />
                        </Grid.ColumnDefinitions>
                        <Image Grid.Column="0"
                   Source="/Csizmazia.WpfDynamicUI.WpfDynamicControl;component/Resources/ButtonClose.png" Width="20" />
                        <Label Grid.Column="1"
                   Content="{Binding Path=Content, RelativeSource={RelativeSource FindAncestor, AncestorType=Button, AncestorLevel=1}}" />
                    </Grid>
                </DataTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="ButtonCopyRiportStyle" TargetType="Button">
        <Setter Property="ContentTemplate">
            <Setter.Value>
                <DataTemplate>
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="Auto" />
                            <ColumnDefinition />
                        </Grid.ColumnDefinitions>
                        <Image Grid.Column="0"
                   Source="/Csizmazia.WpfDynamicUI.WpfDynamicControl;component/Resources/ButtonCopyRiport.png" Width="20" />
                        <Label Grid.Column="1"
                   Content="{Binding Path=Content, RelativeSource={RelativeSource FindAncestor, AncestorType=Button, AncestorLevel=1}}" />
                    </Grid>
                </DataTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="ButtonDefaultRiportStyle" TargetType="Button">
        <Setter Property="ContentTemplate">
            <Setter.Value>
                <DataTemplate>
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="Auto" />
                            <ColumnDefinition />
                        </Grid.ColumnDefinitions>
                        <Image Grid.Column="0"
                   Source="/Csizmazia.WpfDynamicUI.WpfDynamicControl;component/Resources/ButtonDefaultRiport.png" Width="20" />
                        <Label Grid.Column="1"
                   Content="{Binding Path=Content, RelativeSource={RelativeSource FindAncestor, AncestorType=Button, AncestorLevel=1}}" />
                    </Grid>
                </DataTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="ButtonDeleteStyle" TargetType="Button">
        <Setter Property="ContentTemplate">
            <Setter.Value>
                <DataTemplate>
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="Auto" />
                            <ColumnDefinition />
                        </Grid.ColumnDefinitions>
                        <Image Grid.Column="0"
                   Source="/Csizmazia.WpfDynamicUI.WpfDynamicControl;component/Resources/ButtonDelete.png" Width="20" />
                        <Label Grid.Column="1"
                   Content="{Binding Path=Content, RelativeSource={RelativeSource FindAncestor, AncestorType=Button, AncestorLevel=1}}" />
                    </Grid>
                </DataTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="ButtonDownloadStyle" TargetType="Button">
        <Setter Property="ContentTemplate">
            <Setter.Value>
                <DataTemplate>
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="Auto" />
                            <ColumnDefinition />
                        </Grid.ColumnDefinitions>
                        <Image Grid.Column="0"
                   Source="/Csizmazia.WpfDynamicUI.WpfDynamicControl;component/Resources/ButtonDownload.png" Width="20" />
                        <Label Grid.Column="1"
                   Content="{Binding Path=Content, RelativeSource={RelativeSource FindAncestor, AncestorType=Button, AncestorLevel=1}}" />
                    </Grid>
                </DataTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="ButtonEditStyle" TargetType="Button">
        <Setter Property="ContentTemplate">
            <Setter.Value>
                <DataTemplate>
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="Auto" />
                            <ColumnDefinition />
                        </Grid.ColumnDefinitions>
                        <Image Grid.Column="0" Source="/Csizmazia.WpfDynamicUI.WpfDynamicControl;component/Resources/ButtonEdit.png"
                   Width="20" />
                        <Label Grid.Column="1"
                   Content="{Binding Path=Content, RelativeSource={RelativeSource FindAncestor, AncestorType=Button, AncestorLevel=1}}" />
                    </Grid>
                </DataTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="ButtonEditRiportStyle" TargetType="Button">
        <Setter Property="ContentTemplate">
            <Setter.Value>
                <DataTemplate>
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="Auto" />
                            <ColumnDefinition />
                        </Grid.ColumnDefinitions>
                        <Image Grid.Column="0"
                   Source="/Csizmazia.WpfDynamicUI.WpfDynamicControl;component/Resources/ButtonEditRiport.png" Width="20" />
                        <Label Grid.Column="1"
                   Content="{Binding Path=Content, RelativeSource={RelativeSource FindAncestor, AncestorType=Button, AncestorLevel=1}}" />
                    </Grid>
                </DataTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="ButtonEmailStyle" TargetType="Button">
        <Setter Property="ContentTemplate">
            <Setter.Value>
                <DataTemplate>
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="Auto" />
                            <ColumnDefinition />
                        </Grid.ColumnDefinitions>
                        <Image Grid.Column="0"
                   Source="/Csizmazia.WpfDynamicUI.WpfDynamicControl;component/Resources/ButtonEmail.png" Width="20" />
                        <Label Grid.Column="1"
                   Content="{Binding Path=Content, RelativeSource={RelativeSource FindAncestor, AncestorType=Button, AncestorLevel=1}}" />
                    </Grid>
                </DataTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="ButtonExcelStyle" TargetType="Button">
        <Setter Property="ContentTemplate">
            <Setter.Value>
                <DataTemplate>
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="Auto" />
                            <ColumnDefinition />
                        </Grid.ColumnDefinitions>
                        <Image Grid.Column="0"
                   Source="/Csizmazia.WpfDynamicUI.WpfDynamicControl;component/Resources/ButtonExcel.png" Width="20" />
                        <Label Grid.Column="1"
                   Content="{Binding Path=Content, RelativeSource={RelativeSource FindAncestor, AncestorType=Button, AncestorLevel=1}}" />
                    </Grid>
                </DataTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="ButtonFavoriteStyle" TargetType="Button">
        <Setter Property="ContentTemplate">
            <Setter.Value>
                <DataTemplate>
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="Auto" />
                            <ColumnDefinition />
                        </Grid.ColumnDefinitions>
                        <Image Grid.Column="0"
                   Source="/Csizmazia.WpfDynamicUI.WpfDynamicControl;component/Resources/ButtonFavorite.png" Width="20" />
                        <Label Grid.Column="1"
                   Content="{Binding Path=Content, RelativeSource={RelativeSource FindAncestor, AncestorType=Button, AncestorLevel=1}}" />
                    </Grid>
                </DataTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="ButtonFirstStyle" TargetType="Button">
        <Setter Property="ContentTemplate">
            <Setter.Value>
                <DataTemplate>
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="Auto" />
                            <ColumnDefinition />
                        </Grid.ColumnDefinitions>
                        <Image Grid.Column="0"
                   Source="/Csizmazia.WpfDynamicUI.WpfDynamicControl;component/Resources/ButtonFirst.png" Width="20" />
                        <Label Grid.Column="1"
                   Content="{Binding Path=Content, RelativeSource={RelativeSource FindAncestor, AncestorType=Button, AncestorLevel=1}}" />
                    </Grid>
                </DataTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="ButtonFlowChartRiportStyle" TargetType="Button">
        <Setter Property="ContentTemplate">
            <Setter.Value>
                <DataTemplate>
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="Auto" />
                            <ColumnDefinition />
                        </Grid.ColumnDefinitions>
                        <Image Grid.Column="0"
                   Source="/Csizmazia.WpfDynamicUI.WpfDynamicControl;component/Resources/ButtonFlowChartRiport.png" Width="20" />
                        <Label Grid.Column="1"
                   Content="{Binding Path=Content, RelativeSource={RelativeSource FindAncestor, AncestorType=Button, AncestorLevel=1}}" />
                    </Grid>
                </DataTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="ButtonGantChartRiportStyle" TargetType="Button">
        <Setter Property="ContentTemplate">
            <Setter.Value>
                <DataTemplate>
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="Auto" />
                            <ColumnDefinition />
                        </Grid.ColumnDefinitions>
                        <Image Grid.Column="0"
                   Source="/Csizmazia.WpfDynamicUI.WpfDynamicControl;component/Resources/ButtonGantChartRiport.png" Width="20" />
                        <Label Grid.Column="1"
                   Content="{Binding Path=Content, RelativeSource={RelativeSource FindAncestor, AncestorType=Button, AncestorLevel=1}}" />
                    </Grid>
                </DataTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="ButtonHelpStyle" TargetType="Button">
        <Setter Property="ContentTemplate">
            <Setter.Value>
                <DataTemplate>
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="Auto" />
                            <ColumnDefinition />
                        </Grid.ColumnDefinitions>
                        <Image Grid.Column="0" Source="/Csizmazia.WpfDynamicUI.WpfDynamicControl;component/Resources/ButtonHelp.png"
                   Width="20" />
                        <Label Grid.Column="1"
                   Content="{Binding Path=Content, RelativeSource={RelativeSource FindAncestor, AncestorType=Button, AncestorLevel=1}}" />
                    </Grid>
                </DataTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="ButtonHelpRiportStyle" TargetType="Button">
        <Setter Property="ContentTemplate">
            <Setter.Value>
                <DataTemplate>
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="Auto" />
                            <ColumnDefinition />
                        </Grid.ColumnDefinitions>
                        <Image Grid.Column="0"
                   Source="/Csizmazia.WpfDynamicUI.WpfDynamicControl;component/Resources/ButtonHelpRiport.png" Width="20" />
                        <Label Grid.Column="1"
                   Content="{Binding Path=Content, RelativeSource={RelativeSource FindAncestor, AncestorType=Button, AncestorLevel=1}}" />
                    </Grid>
                </DataTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="ButtonInfoStyle" TargetType="Button">
        <Setter Property="ContentTemplate">
            <Setter.Value>
                <DataTemplate>
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="Auto" />
                            <ColumnDefinition />
                        </Grid.ColumnDefinitions>
                        <Image Grid.Column="0" Source="/Csizmazia.WpfDynamicUI.WpfDynamicControl;component/Resources/ButtonInfo.png"
                   Width="20" />
                        <Label Grid.Column="1"
                   Content="{Binding Path=Content, RelativeSource={RelativeSource FindAncestor, AncestorType=Button, AncestorLevel=1}}" />
                    </Grid>
                </DataTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="ButtonLastStyle" TargetType="Button">
        <Setter Property="ContentTemplate">
            <Setter.Value>
                <DataTemplate>
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="Auto" />
                            <ColumnDefinition />
                        </Grid.ColumnDefinitions>
                        <Image Grid.Column="0" Source="/Csizmazia.WpfDynamicUI.WpfDynamicControl;component/Resources/ButtonLast.png"
                   Width="20" />
                        <Label Grid.Column="1"
                   Content="{Binding Path=Content, RelativeSource={RelativeSource FindAncestor, AncestorType=Button, AncestorLevel=1}}" />
                    </Grid>
                </DataTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="ButtonLineChartRiportStyle" TargetType="Button">
        <Setter Property="ContentTemplate">
            <Setter.Value>
                <DataTemplate>
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="Auto" />
                            <ColumnDefinition />
                        </Grid.ColumnDefinitions>
                        <Image Grid.Column="0"
                   Source="/Csizmazia.WpfDynamicUI.WpfDynamicControl;component/Resources/ButtonLineChartRiport.png" Width="20" />
                        <Label Grid.Column="1"
                   Content="{Binding Path=Content, RelativeSource={RelativeSource FindAncestor, AncestorType=Button, AncestorLevel=1}}" />
                    </Grid>
                </DataTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="ButtonLoginStyle" TargetType="Button">
        <Setter Property="ContentTemplate">
            <Setter.Value>
                <DataTemplate>
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="Auto" />
                            <ColumnDefinition />
                        </Grid.ColumnDefinitions>
                        <Image Grid.Column="0"
                   Source="/Csizmazia.WpfDynamicUI.WpfDynamicControl;component/Resources/ButtonLogin.png" Width="20" />
                        <Label Grid.Column="1"
                   Content="{Binding Path=Content, RelativeSource={RelativeSource FindAncestor, AncestorType=Button, AncestorLevel=1}}" />
                    </Grid>
                </DataTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="ButtonLogoffStyle" TargetType="Button">
        <Setter Property="ContentTemplate">
            <Setter.Value>
                <DataTemplate>
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="Auto" />
                            <ColumnDefinition />
                        </Grid.ColumnDefinitions>
                        <Image Grid.Column="0"
                   Source="/Csizmazia.WpfDynamicUI.WpfDynamicControl;component/Resources/ButtonLogoff.png" Width="20" />
                        <Label Grid.Column="1"
                   Content="{Binding Path=Content, RelativeSource={RelativeSource FindAncestor, AncestorType=Button, AncestorLevel=1}}" />
                    </Grid>
                </DataTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="ButtonNextStyle" TargetType="Button">
        <Setter Property="ContentTemplate">
            <Setter.Value>
                <DataTemplate>
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="Auto" />
                            <ColumnDefinition />
                        </Grid.ColumnDefinitions>
                        <Image Grid.Column="0" Source="/Csizmazia.WpfDynamicUI.WpfDynamicControl;component/Resources/ButtonNext.png"
                   Width="20" />
                        <Label Grid.Column="1"
                   Content="{Binding Path=Content, RelativeSource={RelativeSource FindAncestor, AncestorType=Button, AncestorLevel=1}}" />
                    </Grid>
                </DataTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="ButtonOpenStyle" TargetType="Button">
        <Setter Property="ContentTemplate">
            <Setter.Value>
                <DataTemplate>
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="Auto" />
                            <ColumnDefinition />
                        </Grid.ColumnDefinitions>
                        <Image Grid.Column="0" Source="/Csizmazia.WpfDynamicUI.WpfDynamicControl;component/Resources/ButtonOpen.png"
                   Width="20" />
                        <Label Grid.Column="1"
                   Content="{Binding Path=Content, RelativeSource={RelativeSource FindAncestor, AncestorType=Button, AncestorLevel=1}}" />
                    </Grid>
                </DataTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="ButtonOpenRiportStyle" TargetType="Button">
        <Setter Property="ContentTemplate">
            <Setter.Value>
                <DataTemplate>
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="Auto" />
                            <ColumnDefinition />
                        </Grid.ColumnDefinitions>
                        <Image Grid.Column="0"
                   Source="/Csizmazia.WpfDynamicUI.WpfDynamicControl;component/Resources/ButtonOpenRiport.png" Width="20" />
                        <Label Grid.Column="1"
                   Content="{Binding Path=Content, RelativeSource={RelativeSource FindAncestor, AncestorType=Button, AncestorLevel=1}}" />
                    </Grid>
                </DataTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="ButtonOrganizationRiportStyle" TargetType="Button">
        <Setter Property="ContentTemplate">
            <Setter.Value>
                <DataTemplate>
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="Auto" />
                            <ColumnDefinition />
                        </Grid.ColumnDefinitions>
                        <Image Grid.Column="0"
                   Source="/Csizmazia.WpfDynamicUI.WpfDynamicControl;component/Resources/ButtonOrganizationRiport.png" Width="20" />
                        <Label Grid.Column="1"
                   Content="{Binding Path=Content, RelativeSource={RelativeSource FindAncestor, AncestorType=Button, AncestorLevel=1}}" />
                    </Grid>
                </DataTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="ButtonPauseStyle" TargetType="Button">
        <Setter Property="ContentTemplate">
            <Setter.Value>
                <DataTemplate>
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="Auto" />
                            <ColumnDefinition />
                        </Grid.ColumnDefinitions>
                        <Image Grid.Column="0"
                   Source="/Csizmazia.WpfDynamicUI.WpfDynamicControl;component/Resources/ButtonPause.png" Width="20" />
                        <Label Grid.Column="1"
                   Content="{Binding Path=Content, RelativeSource={RelativeSource FindAncestor, AncestorType=Button, AncestorLevel=1}}" />
                    </Grid>
                </DataTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="ButtonPlayStyle" TargetType="Button">
        <Setter Property="ContentTemplate">
            <Setter.Value>
                <DataTemplate>
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="Auto" />
                            <ColumnDefinition />
                        </Grid.ColumnDefinitions>
                        <Image Grid.Column="0" Source="/Csizmazia.WpfDynamicUI.WpfDynamicControl;component/Resources/ButtonPlay.png"
                   Width="20" />
                        <Label Grid.Column="1"
                   Content="{Binding Path=Content, RelativeSource={RelativeSource FindAncestor, AncestorType=Button, AncestorLevel=1}}" />
                    </Grid>
                </DataTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="ButtonPowerPointRiportStyle" TargetType="Button">
        <Setter Property="ContentTemplate">
            <Setter.Value>
                <DataTemplate>
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="Auto" />
                            <ColumnDefinition />
                        </Grid.ColumnDefinitions>
                        <Image Grid.Column="0"
                   Source="/Csizmazia.WpfDynamicUI.WpfDynamicControl;component/Resources/ButtonPowerPointRiport.png" Width="20" />
                        <Label Grid.Column="1"
                   Content="{Binding Path=Content, RelativeSource={RelativeSource FindAncestor, AncestorType=Button, AncestorLevel=1}}" />
                    </Grid>
                </DataTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="ButtonPreviousStyle" TargetType="Button">
        <Setter Property="ContentTemplate">
            <Setter.Value>
                <DataTemplate>
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="Auto" />
                            <ColumnDefinition />
                        </Grid.ColumnDefinitions>
                        <Image Grid.Column="0"
                   Source="/Csizmazia.WpfDynamicUI.WpfDynamicControl;component/Resources/ButtonPrevious.png" Width="20" />
                        <Label Grid.Column="1"
                   Content="{Binding Path=Content, RelativeSource={RelativeSource FindAncestor, AncestorType=Button, AncestorLevel=1}}" />
                    </Grid>
                </DataTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="ButtonRefreshStyle" TargetType="Button">
        <Setter Property="ContentTemplate">
            <Setter.Value>
                <DataTemplate>
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="Auto" />
                            <ColumnDefinition />
                        </Grid.ColumnDefinitions>
                        <Image Grid.Column="0"
                   Source="/Csizmazia.WpfDynamicUI.WpfDynamicControl;component/Resources/ButtonRefresh.png" Width="20" />
                        <Label Grid.Column="1"
                   Content="{Binding Path=Content, RelativeSource={RelativeSource FindAncestor, AncestorType=Button, AncestorLevel=1}}" />
                    </Grid>
                </DataTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="ButtonReloadStyle" TargetType="Button">
        <Setter Property="ContentTemplate">
            <Setter.Value>
                <DataTemplate>
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="Auto" />
                            <ColumnDefinition />
                        </Grid.ColumnDefinitions>
                        <Image Grid.Column="0"
                   Source="/Csizmazia.WpfDynamicUI.WpfDynamicControl;component/Resources/ButtonReload.png" Width="20" />
                        <Label Grid.Column="1"
                   Content="{Binding Path=Content, RelativeSource={RelativeSource FindAncestor, AncestorType=Button, AncestorLevel=1}}" />
                    </Grid>
                </DataTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="ButtonReminderStyle" TargetType="Button">
        <Setter Property="ContentTemplate">
            <Setter.Value>
                <DataTemplate>
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="Auto" />
                            <ColumnDefinition />
                        </Grid.ColumnDefinitions>
                        <Image Grid.Column="0"
                   Source="/Csizmazia.WpfDynamicUI.WpfDynamicControl;component/Resources/ButtonReminder.png" Width="20" />
                        <Label Grid.Column="1"
                   Content="{Binding Path=Content, RelativeSource={RelativeSource FindAncestor, AncestorType=Button, AncestorLevel=1}}" />
                    </Grid>
                </DataTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="ButtonRiportPreviewStyle" TargetType="Button">
        <Setter Property="ContentTemplate">
            <Setter.Value>
                <DataTemplate>
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="Auto" />
                            <ColumnDefinition />
                        </Grid.ColumnDefinitions>
                        <Image Grid.Column="0"
                   Source="/Csizmazia.WpfDynamicUI.WpfDynamicControl;component/Resources/ButtonRiportPreview.png" Width="20" />
                        <Label Grid.Column="1"
                   Content="{Binding Path=Content, RelativeSource={RelativeSource FindAncestor, AncestorType=Button, AncestorLevel=1}}" />
                    </Grid>
                </DataTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="ButtonSaveStyle" TargetType="Button">
        <Setter Property="ContentTemplate">
            <Setter.Value>
                <DataTemplate>
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="Auto" />
                            <ColumnDefinition />
                        </Grid.ColumnDefinitions>
                        <Image Grid.Column="0" Source="/Csizmazia.WpfDynamicUI.WpfDynamicControl;component/Resources/ButtonSave.png"
                   Width="20" />
                        <Label Grid.Column="1"
                   Content="{Binding Path=Content, RelativeSource={RelativeSource FindAncestor, AncestorType=Button, AncestorLevel=1}}" />
                    </Grid>
                </DataTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="ButtonTalkBaloonStyle" TargetType="Button">
        <Setter Property="ContentTemplate">
            <Setter.Value>
                <DataTemplate>
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="Auto" />
                            <ColumnDefinition />
                        </Grid.ColumnDefinitions>
                        <Image Grid.Column="0"
                   Source="/Csizmazia.WpfDynamicUI.WpfDynamicControl;component/Resources/ButtonTalkBaloon.png" Width="20" />
                        <Label Grid.Column="1"
                   Content="{Binding Path=Content, RelativeSource={RelativeSource FindAncestor, AncestorType=Button, AncestorLevel=1}}" />
                    </Grid>
                </DataTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="ButtonTurnOffStyle" TargetType="Button">
        <Setter Property="ContentTemplate">
            <Setter.Value>
                <DataTemplate>
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="Auto" />
                            <ColumnDefinition />
                        </Grid.ColumnDefinitions>
                        <Image Grid.Column="0"
                   Source="/Csizmazia.WpfDynamicUI.WpfDynamicControl;component/Resources/ButtonTurnOff.png" Width="20" />
                        <Label Grid.Column="1"
                   Content="{Binding Path=Content, RelativeSource={RelativeSource FindAncestor, AncestorType=Button, AncestorLevel=1}}" />
                    </Grid>
                </DataTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="ButtonTurnOnStyle" TargetType="Button">
        <Setter Property="ContentTemplate">
            <Setter.Value>
                <DataTemplate>
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="Auto" />
                            <ColumnDefinition />
                        </Grid.ColumnDefinitions>
                        <Image Grid.Column="0"
                   Source="/Csizmazia.WpfDynamicUI.WpfDynamicControl;component/Resources/ButtonTurnOn.png" Width="20" />
                        <Label Grid.Column="1"
                   Content="{Binding Path=Content, RelativeSource={RelativeSource FindAncestor, AncestorType=Button, AncestorLevel=1}}" />
                    </Grid>
                </DataTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="ButtonUploadStyle" TargetType="Button">
        <Setter Property="ContentTemplate">
            <Setter.Value>
                <DataTemplate>
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="Auto" />
                            <ColumnDefinition />
                        </Grid.ColumnDefinitions>
                        <Image Grid.Column="0"
                   Source="/Csizmazia.WpfDynamicUI.WpfDynamicControl;component/Resources/ButtonUpload.png" Width="20" />
                        <Label Grid.Column="1"
                   Content="{Binding Path=Content, RelativeSource={RelativeSource FindAncestor, AncestorType=Button, AncestorLevel=1}}" />
                    </Grid>
                </DataTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="ButtonWarningStyle" TargetType="Button">
        <Setter Property="ContentTemplate">
            <Setter.Value>
                <DataTemplate>
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="Auto" />
                            <ColumnDefinition />
                        </Grid.ColumnDefinitions>
                        <Image Grid.Column="0"
                   Source="/Csizmazia.WpfDynamicUI.WpfDynamicControl;component/Resources/ButtonWarning.png" Width="20" />
                        <Label Grid.Column="1"
                   Content="{Binding Path=Content, RelativeSource={RelativeSource FindAncestor, AncestorType=Button, AncestorLevel=1}}" />
                    </Grid>
                </DataTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="ButtonWordRiportStyle" TargetType="Button">
        <Setter Property="ContentTemplate">
            <Setter.Value>
                <DataTemplate>
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="Auto" />
                            <ColumnDefinition />
                        </Grid.ColumnDefinitions>
                        <Image Grid.Column="0"
                   Source="/Csizmazia.WpfDynamicUI.WpfDynamicControl;component/Resources/ButtonWordRiport.png" Width="20" />
                        <Label Grid.Column="1"
                   Content="{Binding Path=Content, RelativeSource={RelativeSource FindAncestor, AncestorType=Button, AncestorLevel=1}}" />
                    </Grid>
                </DataTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="ButtonZoomOutStyle" TargetType="Button">
        <Setter Property="Width" Value="23.5" />
        <Setter Property="Height" Value="25.5" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="Button">
                    <Grid Width="23.5" Height="25.5">
                        <Image Source="/Csizmazia.WpfDynamicUI.WpfDynamicControl;component/Resources/ButtonZoomOut.png"
                   Stretch="Fill" />
                        <ContentPresenter HorizontalAlignment="Center" />
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsMouseOver" Value="True">
                            <Setter Property="Effect">
                                <Setter.Value>
                                    <DropShadowEffect ShadowDepth="2" />
                                </Setter.Value>
                            </Setter>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="ButtonZoomInStyle" TargetType="Button">
        <Setter Property="Width" Value="23.5" />
        <Setter Property="Height" Value="25.5" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="Button">
                    <Grid Width="23.5" Height="25.5">
                        <Image Source="/Csizmazia.WpfDynamicUI.WpfDynamicControl;component/Resources/ButtonZoomIn.png"
                   Stretch="Fill" />
                        <ContentPresenter HorizontalAlignment="Center" />
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsMouseOver" Value="True">
                            <Setter Property="Effect">
                                <Setter.Value>
                                    <DropShadowEffect ShadowDepth="2" />
                                </Setter.Value>
                            </Setter>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="ApplicationMenuPanelStyle" TargetType="StackPanel"></Style>
    <Style x:Key="ModuleMenuPanelStyle" TargetType="StackPanel"></Style>
    <Style x:Key="DetailsPanelStyle" TargetType="Grid"></Style>
    <Style x:Key="FilterPanelStyle" TargetType="StackPanel"></Style>
    <Style x:Key="ContextMenuPanelStyle" TargetType="StackPanel"></Style>
    <Style x:Key="HelpTextBorderStyle" TargetType="Border">
        <Style.Triggers>
            <DataTrigger Binding="{Binding HelpText}" Value="{x:Null}">
                <Setter Property="Visibility" Value="Collapsed" />
            </DataTrigger>
        </Style.Triggers>
    </Style>
    <Style x:Key="popupStyle" TargetType="Popup">
        <Setter Property="Placement" Value="Center" />
        <Setter Property="StaysOpen" Value="False" />
        <Setter Property="PopupAnimation" Value="Scroll" />
        <Setter Property="MaxWidth" Value="600" />
        <Setter Property="MaxHeight" Value="600" />
    </Style>
    <ControlTemplate x:Key="infoPopupTemplate">
        <Border BorderThickness="1" BorderBrush="Black" Background="LightGray" CornerRadius="2">
            <Grid Margin="3">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto" />
                    <ColumnDefinition />
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                    <RowDefinition />
                </Grid.RowDefinitions>
                <Image Style="{StaticResource PopupInfoImageStyle}" Width="30" />
                <Label Grid.Column="1" Content="Information" TextBlock.FontWeight="Bold" />

                <Separator Grid.Row="1" Grid.ColumnSpan="2" />
                <TextBlock Grid.Row="2" Grid.ColumnSpan="2" Text="{Binding Path=Application.PopupText}"
                   TextWrapping="Wrap" Style="{StaticResource foregroundTextBlockStyle}" />
            </Grid>
        </Border>
    </ControlTemplate>
    <ControlTemplate x:Key="errorPopupTemplate">
        <Border BorderBrush="LightSalmon" Background="LightGray" BorderThickness="1" CornerRadius="2">
            <ScrollViewer HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto">
                <Grid Margin="3">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto" />
                        <ColumnDefinition />
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto" />
                        <RowDefinition Height="Auto" />
                        <RowDefinition />
                    </Grid.RowDefinitions>

                    <Image Style="{StaticResource PopupErrorImageStyle}" Width="30" />
                    <Label Grid.Column="1" Content="Validation errors" TextBlock.FontWeight="Bold" />

                    <Separator Grid.Row="1" Grid.ColumnSpan="2" />
                    <TextBlock Grid.Row="2" Grid.ColumnSpan="2" Text="{Binding Path=Error}"
                     Style="{StaticResource foregroundTextBlockStyle}" />
                </Grid>
            </ScrollViewer>
        </Border>
    </ControlTemplate>

    <Style TargetType="{x:Type wpfModel:DynamicModelControl}">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type wpfModel:DynamicModelControl}">
                    <Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}"
                  BorderThickness="{TemplateBinding BorderThickness}">
                        <AdornerDecorator>
                            <Grid x:Name="ctlGrid">
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="Auto" />
                                    <ColumnDefinition Width="*" />
                                    <ColumnDefinition Width="Auto" />
                                </Grid.ColumnDefinitions>
                                <Grid Grid.Column="0" MinWidth="150"
                      Visibility="{TemplateBinding DisplayMenu, Converter={StaticResource BooleanToVisibilityConverter}}" x:Name="menuGrid">
                                    <Grid.RowDefinitions>
                                        <RowDefinition Height="30*" MinHeight="50" />
                                        <RowDefinition Height="Auto" />
                                        <RowDefinition Height="10*" MinHeight="50" />
                                    </Grid.RowDefinitions>
                                    <GroupBox Grid.Row="0" x:Name="moduleMenuGroup">
                                        <GroupBox.HeaderTemplate>
                                            <DataTemplate>
                                                <DockPanel>
                                                    <Image DockPanel.Dock="Left"
                                 Source="/Csizmazia.WpfDynamicUI.WpfDynamicControl;component/Resources/Button Blank Gray-01.png" Height="25" />
                                                    <TextBlock
Text="{reflectiveWpfTools:LocalizationMarkupExtension 
                                                        ResourceType=properties:Resources, 
                                                        ResourceKey=ModuleMenuName, 
                                                        DefaultValue=ModuleMenu}"
Style="{StaticResource menuGroupHeaderTextBlockStyle}" />

                                                </DockPanel>
                                            </DataTemplate>
                                        </GroupBox.HeaderTemplate>
                                        <ScrollViewer HorizontalScrollBarVisibility="Auto"
                                  VerticalScrollBarVisibility="Auto">
                                            <StackPanel x:Name="PART_ModuleMenuPanel"
                                  Style="{StaticResource ModuleMenuPanelStyle}" />
                                        </ScrollViewer>
                                    </GroupBox>
                                    <GridSplitter Grid.Row="1" Height="3" HorizontalAlignment="Stretch" />
                                    <GroupBox Grid.Row="2" x:Name="applicationMenuGroup">
                                        <GroupBox.HeaderTemplate>
                                            <DataTemplate>
                                                <DockPanel>
                                                    <Image DockPanel.Dock="Left"
                                 Source="/Csizmazia.WpfDynamicUI.WpfDynamicControl;component/Resources/ButtonFavorite.png" Height="25" />
                                                    <TextBlock
Text="{reflectiveWpfTools:LocalizationMarkupExtension 
                                                        ResourceType=properties:Resources, 
                                                        ResourceKey=ApplicationMenuName, 
                                                        DefaultValue=ApplicationMenu}"
Style="{StaticResource menuGroupHeaderTextBlockStyle}" />

                                                </DockPanel>
                                            </DataTemplate>
                                        </GroupBox.HeaderTemplate>
                                        <ScrollViewer HorizontalScrollBarVisibility="Auto"
                                  VerticalScrollBarVisibility="Auto">
                                            <StackPanel x:Name="PART_ApplicationMenuPanel"
                                  Style="{StaticResource ApplicationMenuPanelStyle}" />
                                        </ScrollViewer>
                                    </GroupBox>
                                </Grid>

                                <GroupBox Grid.Column="1" x:Name="centerGroup">
                                    <GroupBox.HeaderTemplate>
                                        <DataTemplate>
                                            <DockPanel>
                                                <Image DockPanel.Dock="Left"
                               Source="/Csizmazia.WpfDynamicUI.WpfDynamicControl;component/Resources/Folder Generic Silver-01.png" Height="25" />
                                                <TextBlock
Text="{reflectiveWpfTools:LocalizationMarkupExtension 
                                                        ResourceType=properties:Resources, 
                                                        ResourceKey=PropertiesName, 
                                                        DefaultValue=Properties}"
Style="{StaticResource menuGroupHeaderTextBlockStyle}" />

                                            </DockPanel>
                                        </DataTemplate>
                                    </GroupBox.HeaderTemplate>
                                    <Grid>
                                        <Grid.RowDefinitions>
                                            <RowDefinition Height="Auto" />
                                            <RowDefinition />

                                        </Grid.RowDefinitions>

                                        <Expander Grid.Row="0" Header="Filter"
                              Visibility="{TemplateBinding DisplayFilter, Converter={StaticResource BooleanToVisibilityConverter}}">
                                            <Border>
                                                <StackPanel x:Name="PART_FilterPanel"
                                    Style="{StaticResource FilterPanelStyle}" />
                                            </Border>
                                        </Expander>
                                        <ScrollViewer Grid.Row="1" VerticalScrollBarVisibility="Auto">
                                            <!-- changed stackpanel to grid -->
                                            <Grid x:Name="PART_DetailsPanel" Style="{StaticResource DetailsPanelStyle}">
                                            </Grid>
                                        </ScrollViewer>

                                    </Grid>
                                </GroupBox>
                                <GroupBox Grid.Column="2" MinWidth="150">
                                    <GroupBox.HeaderTemplate>
                                        <DataTemplate>
                                            <DockPanel x:Name="actionsPanel">
                                                <Image DockPanel.Dock="Left"
                               Source="/Csizmazia.WpfDynamicUI.WpfDynamicControl;component/Resources/Gear.png" Height="25" />
                                                <TextBlock
Text="{reflectiveWpfTools:LocalizationMarkupExtension 
                                                        ResourceType=properties:Resources, 
                                                        ResourceKey=ModelActionsName, 
                                                        DefaultValue=Actions}"
Style="{StaticResource menuGroupHeaderTextBlockStyle}" />

                                            </DockPanel>
                                        </DataTemplate>
                                    </GroupBox.HeaderTemplate>
                                    <Grid>
                                        <Grid.RowDefinitions>
                                            <RowDefinition />
                                            <RowDefinition Height="Auto" />
                                        </Grid.RowDefinitions>
                                        <ScrollViewer Grid.Row="0" HorizontalScrollBarVisibility="Auto"
                                  VerticalScrollBarVisibility="Auto">
                                            <StackPanel x:Name="PART_ContextMenuPanel"
                                  Style="{StaticResource ContextMenuPanelStyle}">
                                            </StackPanel>
                                        </ScrollViewer>
                                        <!-- Help Text Area -->
                                        <Border Grid.Row="1" Style="{StaticResource HelpTextBorderStyle}"
                            MaxWidth="150" BorderBrush="Black" BorderThickness="1" CornerRadius="3">
                                            <Grid Margin="3" x:Name="helpGrid">
                                                <Grid.ColumnDefinitions>
                                                    <ColumnDefinition Width="Auto" />
                                                    <ColumnDefinition />
                                                </Grid.ColumnDefinitions>
                                                <Image
Source="/Csizmazia.WpfDynamicControl;component/Resources/ButtonInfo.png" Width="30" Height="30" VerticalAlignment="Top" />
                                                <TextBlock Grid.Column="1" Margin="3" VerticalAlignment="Top"
                                   Text="{Binding HelpText}" TextAlignment="Justify" TextWrapping="Wrap" Style="{StaticResource foregroundTextBlockStyle}" />
                                            </Grid>
                                        </Border>
                                    </Grid>
                                </GroupBox>

                                <Popup x:Name="infoPopupHost" IsOpen="{Binding Path=Application.IsPopupTextOpened}"
                       Style="{StaticResource popupStyle}">
                                    <ContentControl Template="{StaticResource infoPopupTemplate}" />
                                </Popup>
                                <Popup x:Name="errorPopupHost"
                       IsOpen="{Binding Error, Mode=OneWay, Converter={StaticResource IsNotEmptyStringConverter}}"
                       Style="{StaticResource popupStyle}">
                                    <ContentControl Template="{StaticResource errorPopupTemplate}" />
                                </Popup>
                            </Grid>
                        </AdornerDecorator>
                    </Border>

                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <!--TODO: Built in KB via context menu  -->
        <!--<Setter Property="ContextMenu">
            <Setter.Value>
                <MenuItem Header="How to samples">
                    <Hyperlink  NavigateUri="BindingHelp">
                        Bind model
                    </Hyperlink>
                </MenuItem>
            </Setter.Value>
        </Setter>-->
        <Style.Triggers>
            <DataTrigger Binding="{Binding}" Value="{x:Null}">
                <Setter Property="Visibility" Value="Collapsed" />
            </DataTrigger>
        </Style.Triggers>
    </Style>
    <Style TargetType="{x:Type customControls:DynamicPagerControl}">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type customControls:DynamicPagerControl}">

                    <Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}"
                  BorderThickness="{TemplateBinding BorderThickness}">
                        <Grid x:Name="PART_Template">
                            <Grid.RowDefinitions>
                                <RowDefinition />
                                <RowDefinition Height="Auto" />
                            </Grid.RowDefinitions>
                            <ContentControl Grid.Row="0" x:Name="PART_DynamicGrid" />
                            <Grid Grid.Row="1">
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="Auto" />
                                    <ColumnDefinition Width="Auto" />
                                    <ColumnDefinition Width="20*" />
                                    <ColumnDefinition Width="20*" />
                                    <ColumnDefinition Width="Auto" />
                                    <ColumnDefinition Width="Auto" />
                                    <ColumnDefinition Width="Auto" />
                                </Grid.ColumnDefinitions>
                                <ContentControl Grid.Column="0" x:Name="PART_MoveFirst" />
                                <ContentControl Grid.Column="1" x:Name="PART_MovePrevious" />
                                <ContentControl Grid.Column="2" Margin="3,0">
                                    <TextBlock HorizontalAlignment="Right" VerticalAlignment="Center">
                                        <TextBlock.ToolTip>
                                            <TextBlock Text="CurrentPage / PageCount" />
                                        </TextBlock.ToolTip>
                    <TextBlock x:Name="PART_CurrentPage" />
                    /
                    <TextBlock x:Name="PART_PageCount" />
                  </TextBlock>
                                </ContentControl>
                                <ContentControl Grid.Column="3" Margin="3,0">
                                    <ContentControl x:Name="PART_PageSize" HorizontalAlignment="Left"
                                  VerticalAlignment="Center" />
                                </ContentControl>

                                <ContentControl Grid.Column="4" x:Name="PART_Reload" />
                                <ContentControl Grid.Column="5" x:Name="PART_MoveNext" />
                                <ContentControl Grid.Column="6" x:Name="PART_MoveLast" />
                            </Grid>
                        </Grid>
                    </Border>

                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style TargetType="{x:Type customControls:DynamicGMapMarkerControl}">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type customControls:DynamicGMapMarkerControl}">
                    <Grid>
                        <Image x:Name="PART_Icon" VerticalAlignment="Center" HorizontalAlignment="Center"
                   Source="/Csizmazia.WpfDynamicUI.WpfDynamicControl;component/Resources/MapGreenMarker.png" />
                        <Popup x:Name="PART_Popup" Placement="Mouse">
                            <Label Content="{TemplateBinding Title}" Padding="5" Background="LightGray"
                     Foreground="{StaticResource BackgroundBrush}" BorderBrush="WhiteSmoke" BorderThickness="2" FontSize="12" />
                        </Popup>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="Height" Value="40" />
        <Setter Property="Width" Value="30" />
        <Setter Property="Opacity" Value="10" />
    </Style>
    <!-- Dynamic Gmap control -->
    <Style TargetType="{x:Type customControls:DynamicGMapControl}">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type customControls:DynamicGMapControl}">
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition />
                            <ColumnDefinition Width="Auto" />
                        </Grid.ColumnDefinitions>
                        <GroupBox Header="Map" Grid.Column="0">
                            <windowsPresentation:GMapControl x:Name="PART_GMapControl" MaxZoom="17" MinZoom="1" />
                        </GroupBox>
                        <GroupBox Header="Zoom" Grid.Column="1">
                            <Grid>
                                <Grid.RowDefinitions>
                                    <RowDefinition Height="Auto" />
                                    <RowDefinition />
                                    <RowDefinition Height="Auto" />
                                </Grid.RowDefinitions>

                                <Button x:Name="PART_ButtonZoomIn" Grid.Row="0"
                        Style="{StaticResource ButtonZoomInStyle}" HorizontalAlignment="Center" VerticalAlignment="Bottom" Width="23"
                        Height="25" />
                                <Slider x:Name="PART_SliderZoom" Grid.Row="1" Orientation="Vertical"
                        HorizontalAlignment="Center" VerticalAlignment="Stretch" Maximum="{Binding Path=MaxZoom, ElementName=PART_GMapControl}"
                        Minimum="{Binding Path=MinZoom, ElementName=PART_GMapControl}"
                        Value="{Binding ElementName=PART_GMapControl, Path=Zoom}" TickPlacement="Both" SmallChange="1" />
                                <Button x:Name="PART_ButtonZoomOut" Grid.Row="2"
                        Style="{StaticResource ButtonZoomOutStyle}" HorizontalAlignment="Center" VerticalAlignment="Top" Width="23" Height="25" />

                            </Grid>
                        </GroupBox>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="MinHeight" Value="400" />
    </Style>
</ResourceDictionary>